<?php
class Roles_Model_DbTable_Perfilrol extends Zend_Db_Table_Abstract {
	/** Table name */
	protected $_name = 'perfilrol';
	protected $_primary = 'codperfil';
	protected $_sequence = 'seq_perfilrol';
	protected $_rowClass = 'App_Audit_Row';
	
	public function getArregloSeccionPerfil($codigo) {
		$arr_seccion_perfil = array ();
		//$sql = "SELECT codseccion FROM perfilrol WHERE codrol=? ORDER BY codseccion";
		if ($codigo != "") {
			$perfilrol = new Roles_Model_DbTable_Perfilrol ( );
			
			$select = $this->select ()
			          ->from(array("p"=>"perfilrol"))
			          ->where ( "p.codrol=?", $codigo )
			          ->order ( array ('p.codseccion' ) );
			$arr_seccion_perfil = $select->query ()->fetchAll ();
		}
		return $arr_seccion_perfil;
	}
	
}